Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

236 cypress timing error #241

Closed
wants to merge 5 commits into from
Closed

Conversation

ekraffmiller
Copy link
Contributor

@ekraffmiller ekraffmiller commented Nov 29, 2023

What this PR does / why we need it:

The e2e Dataset test was sometimes failing, due to asynchronous page updates that happened while the test was running

Which issue(s) this PR closes:

Special notes for your reviewer:

Because of the timing nature of this error, I couldn't reproduce it consistently, so I can't be sure that this change fixes the problem. But I did break down the steps in the test into smaller increments, based on the Cypress recommendations for this type of error. I've run the test a couple of times, and it seems to be working. Note that I've only seen this happen in the Github action, not when running the test locally.

Suggestions on how to test this:

Make sure that the e2e test in the github Action passes. Run it a couple of times to try to trigger the error

Does this PR introduce a user interface change? If mockups are available, please link/include them here:

no

Is there a release notes update needed for this change?:

no

Additional documentation:

https://docs.cypress.io/guides/references/error-messages#cy-failed-because-the-page-updated

@ekraffmiller ekraffmiller marked this pull request as ready for review November 29, 2023 14:14
@ekraffmiller ekraffmiller marked this pull request as draft November 29, 2023 14:54
@coveralls
Copy link

coveralls commented Dec 5, 2023

Coverage Status

coverage: 98.58% (+0.3%) from 98.29%
when pulling 1ec1eda on 236-cypress-timing-error
into 1acebdf on develop.

@ekraffmiller
Copy link
Contributor Author

This last commit shows that the error was still happening, even after moving the API call to earlier in the page loading logic.

I thought at first the the double rendering and Effects caused by React StrictMode were causing the error, but I was able to reproduce the error with StrictMode removed. During my testing I was able to consistently reproduce the error, and fixed the error by breaking up the Cypress commands before clicking the button.

Given that the refactoring didn't work, I'm going to close this PR and create a new one that just makes the changes to the Cypress test.

@MellyGray MellyGray deleted the 236-cypress-timing-error branch April 4, 2024 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cypress timing error in Dataset e2e test
2 participants